package com.media.controller;

import com.content.base.model.PageParams;
import com.content.base.model.PageResult;
import com.media.dto.QueryMediaParamsDto;
import com.media.service.MediaFilesService;
import com.media.vo.MediaFileVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "媒资管理相关接口")
public class MediaInfoController {

    @Autowired
    private MediaFilesService mediaFilesService;
    @PostMapping("/files")
    @ApiOperation("媒资查询接口")
    public PageResult<MediaFileVo> getAllMediaFiles(PageParams pageParams,@RequestBody QueryMediaParamsDto queryMediaParamsDto) {
        PageResult<MediaFileVo> page = mediaFilesService.getAllMediaFiles(pageParams,queryMediaParamsDto);
        return page;
    }
}
